import http from "@/api/axios";

export const getListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/selectInWarehousePage",
    data
  });
};
export const getPageStaticApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/selectInWarehouseCount",
    data
  });
};
// 修改渠道
export const modifyChannelApi = (data: { id: string; channelId: string; countryRegionId: string }) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/updateShipmentChannel",
    data
  });
};
// 修改品名
export const modifyProductNameApi = (data: { id: string; productName: string }) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/updateProductName",
    data
  });
};
// 修改品名
export const modifyMasterialApi = (data: { id: string; materialQualityId: string }) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/updateMaterialQuality",
    data
  });
};
// 修改备注、内部备注
export const modifyRemarkApi = (data: { id: string; [propsName: string]: any }) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/operateRemarkShipmentById",
    data
  });
};
// 根据运单ID获取货箱信息
export const getBoxInfoByIdApi = (shipmentId: string) => {
  return http({
    method: "get",
    url: `/base/biz/bizInWarehouseManage/selectBizPreOrderShipmentBoxList/${shipmentId}`
  });
};
// 手动拣货
export const handPickingOrderApi = (data: {
  warehouseName: string;
  warehouseId: string;
  bizPreOrderShipmentList: { id: string; boxWeight: number; boxLength: number; boxWidth: number; boxHeight: number }[];
}) => {
  return http({
    method: "post",
    url: "/base/biz/bizInWarehouseManage/commitShipmentBox",
    data
  });
};
// 未入仓运单导出
export const stockManagementExportApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/export/biz/exportExcel/unWarehousingExcel",
    data
  });
};

// 修改取件地址时-列表
export const chooseAddressPageApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/customer/pickup/address/chooseAddressPage",
    data
  });
};
